package com.five.mapper;

import com.five.basic.mapper.BaseMapper;
import com.five.pojo.Novel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface NovelMapper extends BaseMapper<Novel> {

    /**
     * 查询作者的所有小说
     * @param authorId 作者id
     * @return 小说列表
     */
    List<Novel> queryNovels(Long authorId);

     /**
      * 更新小说总字数
      */
    void updateWordCount(Long novelId, Integer wordCount);

     /**
      * 更新小说状态
      */
    void updateStatus(Long novelId, Byte status);
}
